<?php

//
// TwitterModule
// Uses the Twitter API v1.1
// Grabs the most recent tweets for display as a module on a page
//

class TwitterModule extends LiriopeModule {

  public function show($vars=NULL) {
    global $module;

    $twitterAPI = new Twitter(array(
      'screen_name' => 'renew_oc',
      'slug' => 'roc-feed',
      'access_token' => c::get('twitter.accessToken')
    ));

    $module->screen_name = 'renew_oc';
    $module->list = 'roc-feed';
    $module->tweets = $twitterAPI->listStatuses(3)->get();
  }

}
